﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DLog
{
    public sealed class SyncLogManager
    {
        static ILogger logger;
        /// <summary>
        /// get current logger
        /// </summary>
        /// <returns></returns>
        public static ILogger GetCurrentClassLogger()
        {
            if (logger == null)
            {
                logger = new SyncLogger();
                logger.Init(DLog.Config.NlogConfig.Target, DLog.Config.NlogConfig.ConnectionString);
            }
            return logger;
        }
        /// <summary>
        /// dispose resources
        /// </summary>
        public void Dispose()
        {
            GC.SuppressFinalize(this);
        }
    }
}
